import 'package:drift/drift.dart';

import 'act_tb.dart';

///用户信息缓存
class UserTb extends Table {
  ///用户id
  TextColumn get id => text()();

  ///年龄
  IntColumn get age => integer().nullable()();

  ///类型
  TextColumn get renderStyle => text().nullable()();

  ///关于我
  TextColumn get aboutMe => text().nullable()();

  ///登录账户id,用于数据隔离
  TextColumn get accountId => text().references(ActTb, #id)();

  ///昵称
  TextColumn get nickname => text().clientDefault(() => '')();

  ///头像
  TextColumn get avatar => text().clientDefault(() => '')();

  ///问候语
  TextColumn get greetings => text().clientDefault(() => '')();

  @override
  Set<Column> get primaryKey => {id, accountId};
}
